/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package slisfx;

import java.io.*;
import java.io.PrintWriter;
import java.net.URL;
import java.net.URLConnection;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Rebecca
 */
public class WriteFile {
    
    public static void writeTo(String deviceAction){ 
        try { 
//                URL url = new URL("http://csee.wvu.edu/seniordesign/Fall2011-480-Group09/Answers.txt");
//                URLConnection connection = url.openConnection();
//                connection.setDoOutput(true);
//                try (OutputStreamWriter out = new OutputStreamWriter(connection.getOutputStream())) {
//                    out.write(deviceAction);
//                }
                PrintWriter pw = new PrintWriter("Answers.txt");
                pw.print(deviceAction);
                pw.close();
                        } catch (IOException ex) {
            Logger.getLogger(WriteFile.class.getName()).log(Level.SEVERE, null, ex);
        }
      }
    public static void main(String[] args) {
        writeTo("C1");
    }
    
    }

